using System;
using System.Collections.Generic;
using System.Text;

using NHibernate;
using Zwms.Data.Base;
using System.Runtime.Serialization;

namespace Zwms.Data.BusinessObjects
{
    [DataContract]
    public partial class WhShelf : BusinessBase<string>
    {
        #region Declarations

        private string _shelfCode = String.Empty;
        private string _warehousCode = String.Empty;
        private string _areaName = String.Empty;
        private string _warehouseName = String.Empty;
        private string _areaCode = String.Empty;
        private string _shelfName = String.Empty;
        private string _shelfType = String.Empty;
        private string _createUserCode = String.Empty;
        private string _createUserName = String.Empty;
        private string _createDate = String.Empty;
        private string _createTime = String.Empty;
        private string _editUserCode = String.Empty;
        private string _editUserName = String.Empty;
        private string _editDate = String.Empty;
        private string _editTime = String.Empty;
        private string _isDeactivated = String.Empty;
        private string _remark = String.Empty;



        #endregion

        #region Constructors

        public WhShelf() { }

        #endregion

        #region Methods

        public override int GetHashCode()
        {
            System.Text.StringBuilder sb = new System.Text.StringBuilder();

            sb.Append(this.GetType().FullName);
            sb.Append(_shelfCode);
            sb.Append(_warehousCode);
            sb.Append(_areaCode);
            sb.Append(_shelfName);
            sb.Append(_shelfType);
            sb.Append(_createUserCode);
            sb.Append(_createUserName);
            sb.Append(_createDate);
            sb.Append(_createTime);
            sb.Append(_editUserCode);
            sb.Append(_editUserName);
            sb.Append(_editDate);
            sb.Append(_editTime);
            sb.Append(_isDeactivated);
            sb.Append(_remark);

            return sb.ToString().GetHashCode();
        }

        #endregion

        #region Properties

        //[DataMember]
        //public override string Id
        //{
        //    get
        //    {
        //        System.Text.StringBuilder uniqueId = new System.Text.StringBuilder();
        //        uniqueId.Append(_shelfCode.ToString());
        //        uniqueId.Append("^");
        //        uniqueId.Append(_warehousCode.ToString());
        //        uniqueId.Append("^");
        //        uniqueId.Append(_areaCode.ToString());
        //        return uniqueId.ToString();
        //    }
        //}

        [DataMember]
        public virtual string AreaName
        {
            get { return _areaName.TrimEnd(); }
            set
            {
                _areaName = value;
            }
        }
        [DataMember]
        public virtual string WarehouseName
        {
            get { return _warehouseName.TrimEnd(); }
            set
            {
                _warehouseName = value;
            }
        }

        [DataMember]
        public virtual string ShelfCode
        {
            get { return _shelfCode.TrimEnd(); }
            set
            {
                OnShelfCodeChanging();
                _shelfCode = value;
                OnShelfCodeChanged();
            }
        }
        partial void OnShelfCodeChanging();
        partial void OnShelfCodeChanged();

        [DataMember]
        public virtual string WarehouseCode
        {
            get { return _warehousCode.TrimEnd(); }
            set
            {
                OnWarehousCodeChanging();
                _warehousCode = value;
                OnWarehousCodeChanged();
            }
        }
        partial void OnWarehousCodeChanging();
        partial void OnWarehousCodeChanged();

        [DataMember]
        public virtual string AreaCode
        {
            get { return _areaCode.TrimEnd(); }
            set
            {
                OnAreaCodeChanging();
                _areaCode = value;
                OnAreaCodeChanged();
            }
        }
        partial void OnAreaCodeChanging();
        partial void OnAreaCodeChanged();

        [DataMember]
        public virtual string ShelfName
        {
            get { return _shelfName.TrimEnd(); }
            set
            {
                OnShelfNameChanging();
                _shelfName = value;
                OnShelfNameChanged();
            }
        }
        partial void OnShelfNameChanging();
        partial void OnShelfNameChanged();

        [DataMember]
        public virtual string ShelfType
        {
            get { return _shelfType.TrimEnd(); }
            set
            {
                OnShelfTypeChanging();
                _shelfType = value;
                OnShelfTypeChanged();
            }
        }
        partial void OnShelfTypeChanging();
        partial void OnShelfTypeChanged();

        [DataMember]
        public virtual string CreateUserCode
        {
            get { return _createUserCode.TrimEnd(); }
            set
            {
                OnCreateUserCodeChanging();
                _createUserCode = value;
                OnCreateUserCodeChanged();
            }
        }
        partial void OnCreateUserCodeChanging();
        partial void OnCreateUserCodeChanged();

        [DataMember]
        public virtual string CreateUserName
        {
            get { return _createUserName.TrimEnd(); }
            set
            {
                OnCreateUserNameChanging();
                _createUserName = value;
                OnCreateUserNameChanged();
            }
        }
        partial void OnCreateUserNameChanging();
        partial void OnCreateUserNameChanged();

        [DataMember]
        public virtual string CreateDate
        {
            get { return _createDate.TrimEnd(); }
            set
            {
                OnCreateDateChanging();
                _createDate = value;
                OnCreateDateChanged();
            }
        }
        partial void OnCreateDateChanging();
        partial void OnCreateDateChanged();

        [DataMember]
        public virtual string CreateTime
        {
            get { return _createTime.TrimEnd(); }
            set
            {
                OnCreateTimeChanging();
                _createTime = value;
                OnCreateTimeChanged();
            }
        }
        partial void OnCreateTimeChanging();
        partial void OnCreateTimeChanged();

        [DataMember]
        public virtual string EditUserCode
        {
            get { return _editUserCode.TrimEnd(); }
            set
            {
                OnEditUserCodeChanging();
                _editUserCode = value;
                OnEditUserCodeChanged();
            }
        }
        partial void OnEditUserCodeChanging();
        partial void OnEditUserCodeChanged();

        [DataMember]
        public virtual string EditUserName
        {
            get { return _editUserName.TrimEnd(); }
            set
            {
                OnEditUserNameChanging();
                _editUserName = value;
                OnEditUserNameChanged();
            }
        }
        partial void OnEditUserNameChanging();
        partial void OnEditUserNameChanged();

        [DataMember]
        public virtual string EditDate
        {
            get { return _editDate.TrimEnd(); }
            set
            {
                OnEditDateChanging();
                _editDate = value;
                OnEditDateChanged();
            }
        }
        partial void OnEditDateChanging();
        partial void OnEditDateChanged();

        [DataMember]
        public virtual string EditTime
        {
            get { return _editTime.TrimEnd(); }
            set
            {
                OnEditTimeChanging();
                _editTime = value;
                OnEditTimeChanged();
            }
        }
        partial void OnEditTimeChanging();
        partial void OnEditTimeChanged();

        [DataMember]
        public virtual string IsDeactivated
        {
            get { return _isDeactivated.TrimEnd(); }
            set
            {
                OnIsDeactivatedChanging();
                _isDeactivated = value;
                OnIsDeactivatedChanged();
            }
        }
        partial void OnIsDeactivatedChanging();
        partial void OnIsDeactivatedChanged();

        [DataMember]
        public virtual string Remark
        {
            get { return _remark.TrimEnd(); }
            set
            {
                OnRemarkChanging();
                _remark = value;
                OnRemarkChanged();
            }
        }
        partial void OnRemarkChanging();
        partial void OnRemarkChanged();

        #endregion
    }
}